﻿<div class="bg_main2">
  
        <div class="game_summer" id="game_summer"></div>
  
</div>
<script type="text/javascript">

var flashvars = {userName : '<?=$user_data[0]->fullname?>',linkPost:'<?=PATH_URL.'contest_upload/get_contest'?>',linkUpload:'<?=PATH_URL.'contest_upload/upload'?>'};
swfobject.embedSWF(root+'static/flash/pizzahut_end_year.swf?v='+<?=rand(1,1000000)?>, 'game_summer', '810', '665', '9.0.45', root+'/swfobject/expressinstall.swf', flashvars, {base:root + "static/flash/",bgcolor: '#CCCCCC', menu: 'false',allowFullScreen:'true',wmode:'transparent'});
           
</script>
<script>
        function reload()
        {
            top.location.href = 'https://www.facebook.com/VietnamPizzaHut/app_225013754346362';
        }
        function invite2()
        {
            link = '<?=$this->session->userdata('FB_REDIRECT_PAGE')?>';
            img ='<?= PATH_URL.'static/images/logo.png'?>';
            title = 'Pizza Hut VN - Sáng tạo tiệc cuối năm cùng Cheesy Bites.';
            var title_invite_contest=title;
            var des_invite=title;
            FB.ui({
                method: 'apprequests',
                message: title_invite_contest
            }, function (response) {
                if (response && response.to) {
                    var id=String(response.to);
                    //var _link = root+_link1;
                    
                    $.each(id.split(','), function(key, value) { 
                        FB.api('/'+value+'/feed', 'post', {
                            //message: link,
                            picture: img,
                            caption: decodeURIComponent(title),
                            name: decodeURIComponent(title),
                            link:link,
                            description:des_invite
                        }, function(response) {
                            if (!response || response.error) {
                                console.log('Error occured');
                            } else {
                                console.log('Post ID: ' + response.id);
                            }
                        }); 
                    });
                }
            });
            return false;     
        }

</script>